/**
 * Software License, Version 1.0
 * 
 * Copyright 2003 The Trustees of Indiana University.  All rights reserved.
 * 
 *
 *Redistribution and use in source and binary forms, with or without 
 *modification, are permitted provided that the following conditions are met:
 *
 *1) All redistributions of source code must retain the above copyright notice,
 * the list of authors in the original source code, this list of conditions and
 * the disclaimer listed in this license;
 *2) All redistributions in binary form must reproduce the above copyright 
 * notice, this list of conditions and the disclaimer listed in this license in
 * the documentation and/or other materials provided with the distribution;
 *3) Any documentation included with all redistributions must include the 
 * following acknowledgement:
 *
 *"This product includes software developed by the Community Grids Lab. For 
 * further information contact the Community Grids Lab at 
 * http://communitygrids.iu.edu/."
 *
 * Alternatively, this acknowledgement may appear in the software itself, and 
 * wherever such third-party acknowledgments normally appear.
 * 
 *4) The name Indiana University or Community Grids Lab or NaradaBrokering, 
 * shall not be used to endorse or promote products derived from this software 
 * without prior written permission from Indiana University.  For written 
 * permission, please contact the Advanced Research and Technology Institute 
 * ("ARTI") at 351 West 10th Street, Indianapolis, Indiana 46202.
 *5) Products derived from this software may not be called NaradaBrokering, 
 * nor may Indiana University or Community Grids Lab or NaradaBrokering appear
 * in their name, without prior written permission of ARTI.
 * 
 *
 * Indiana University provides no reassurances that the source code provided 
 * does not infringe the patent or any other intellectual property rights of 
 * any other entity.  Indiana University disclaims any liability to any 
 * recipient for claims brought by any other entity based on infringement of 
 * intellectual property rights or otherwise.  
 *
 *LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO 
 *WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES
 *NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF 
 *INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. 
 *INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", 
 *"VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE.  
 *LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR 
 *ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION 
 *GENERATED USING SOFTWARE.
 */
package cgl.narada.wsinfra.wsr;

import javax.xml.namespace.QName;

/** 
    This class provides a one-stop for all the QNames related to WSR. 
    This eliminates the need to hard-code this in several places. Furthermore,
    if the spec changes the impact of this change will be felt at far fewer 
    places.
    
    @author Sima Patel
    $Date: 2005/05/04 18:05:48 $
    $Revision: 1.9 $
*/


public class WsrQNames {
  
    private static final WsrQNames instance = new WsrQNames();
    private static final String wsrUri = 
    	"http://docs.oasis-open.org/wsrm/2004/06/ws-reliability-1.1.xsd";
    private static final String wsrExtUri = 
            "http://docs.oasis-open.org/wsrm/2004/06/" +
            "ws-reliability-1.1.xsd/wsrext";
    private static final String wsrxUri = 
        "http://www.naradabrokering.org/NbWsrExtension";

  
    /** Elements related to WSR exchanges */
    private static final QName processRequest =
            new QName(wsrUri, "ProcessRequest");
    private static final QName processPollRequest = 
            new QName(wsrUri, "ProcessPollRequest");
    private static final QName processResponse = 
            new QName(wsrUri, "ProcessResponse");
 
  
    /** Elements related to WSR headers */
    private static final QName request = new QName(wsrUri, "Request");
    private static final QName pollRequest = new QName(wsrUri, "PollRequest");
    private static final QName response = new QName(wsrUri, "Response");
    
    /** Elements related to WSR Request Headers*/
    private static final QName messageId = new QName(wsrUri,"MessageId");
    private static final QName messageExpiryTime = new QName(wsrUri,"ExpiryTime");
    private static final QName replyPattern = new QName(wsrUri,"ReplyPattern");
    
    /** Elements related to WSR PollRequest Headers */
    private static final QName refToMessageIds = 
        new QName(wsrUri,"RefToMessageIds");
         
    /** Elements related to WSR-Ext headers */
    private static final QName groupId = new QName(wsrExtUri, "GroupId");
    private static final QName groupExpiryTime = 
        new QName(wsrExtUri, "GroupExpiryTime");
    private static final QName groupMaxIdleDuration = 
        new QName(wsrExtUri, "GroupMaxIdleDuration");
    private static final QName mExpiryTime = 
        new QName(wsrExtUri,"MessageExpiryTime");
    private static final QName rPattern = 
        new QName(wsrExtUri, "ReplyPattern");
    private static final QName lastMessage = new QName(wsrExtUri,"LastMessage");
    private static final QName replyTo = new QName(wsrExtUri,"ReplyTo");
    private static final QName messageExchangePattern = 
    	                     new QName(wsrExtUri, "MEP");
    
  
    private String moduleName = "WsrQNames: ";

    private WsrQNames() {
    }

    public static WsrQNames getInstance() {
        return instance;
    }
  
    /** Get QName associated with exchange */
    public QName getProcessRequest() {
        return processRequest;
    }
  
    /** Get QName associated with exchange */
    public QName getProcessPollRequest() {
        return processPollRequest;
    }

    /** Get QName associated with exchange */
    public QName getProcessResponse() {
        return processResponse;
    }

    /** Get QName associated with Protocol element */
    public QName getRequest() {
        return request;
    }

    /** Get QName associated with Protocol element */
    public QName getResponse() {
        return response;
    }

    /** Get QName associated with Protocol element */
    public QName getPollRequest() {
        return pollRequest;
    }
    /** Get QName associated with MessageID element*/
    public QName getMessageId(){
    	return messageId;
    }
  
    /** Get QName associated with MessagExpiryTime element*/
    public QName getExpiryTime(){
    	return messageExpiryTime;
    }
    /** Get QName associated with ReplyPattern element*/
    public QName getReplyPattern(){
    	return replyPattern;
    }
  
    /** Get QName associated with RefToMessageIds element*/
    public QName getRefToMessageIds(){
    	return refToMessageIds;
    }
    /** Get QName associated with WSR-Ext GroupId */
    public QName getGroupId(){
        return groupId;
    }
    /** Get QName associated with WSR-Ext GroupExpiryTime*/
    public QName getGroupExpiryTime(){
    	return groupExpiryTime;
    }
    /** Get QName associated with WSR-Ext GroupMaxIdleDuration*/
    public QName getGroupMaxIdleDuration(){
    	return groupMaxIdleDuration;
    }
    /** Get QName associated with WSR-Ext Message Expiry Time*/
    public QName getMExpiryTime(){
    	return mExpiryTime;
    }
    /** Get QName associated with WSR-Ext Reply Pattern*/
    public QName getRPattern(){
    	return rPattern;
    }
    /** Get QName associated with WSR-Ext ReplyTo */
    public QName getReplyTo(){
    	return replyTo;
    }
    
    /** Get QName associated with WSR-Ext */
    public QName getMessageExchangePattern(){
            return messageExchangePattern;
    }
    /** Returns the QName associated with the properietary LastMessage indicator
    that applications can add to SOAP messages. This removed by the source 
    node after it processes the SOAP message, so the SINK node never gets 
    anything other than what's outlined in the specification. */
    public QName getLastMessage() {
    	return lastMessage;
}
}